home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Util / conv / Acvt.lha / Acvt 1.07 / sources / cprefile.h < prev    next >
C/C++ Source or Header  |  2001-03-08  |  1KB  |  57 lines

  1. //    This program is free software; you can redistribute it and/or modify
  2. //    it under the terms of the GNU General Public License as published by
  3. //    the Free Software Foundation; either version 2 of the License, or
  4. //    any later version.
  5. //
  6. //    This program is distributed in the hope that it will be useful,
  7. //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9. //    GNU General Public License for more details.
  10. //
  11. //    You should have received a copy of the GNU General Public License
  12. //    along with this program; if not, write to the Free Software
  13. //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. //
  15.  
  16. #include "wintypes.h"
  17. #include "cgenfile.h"
  18.  
  19. #ifndef __CPREFILE_H__
  20. #define __CPREFILE_H__
  21.  
  22.  
  23. class CPreFile : public CGenFile
  24. {
  25. public:
  26.     CPreFile();
  27.     ~CPreFile();
  28.  
  29.     BOOL Open( CGenFile*, int );
  30.  
  31.     BOOL Read( void*, int, int* = NULL );
  32.     BOOL Write( void*, int, int* = NULL );
  33.  
  34.     BOOL Seek( long, int );
  35.     long GetLength() { return m_lLength; };
  36.     DWORD GetLastError() { return m_dwLastError; };
  37.     void Close();
  38.  
  39. private:
  40.     BOOL    PreRead();
  41.  
  42.     BOOL    m_bOpened;
  43.  
  44.     DWORD m_dwLastError;
  45.     
  46.     long    m_lCacheStartOffset;
  47.     long    m_lCacheEndOffset;
  48.  
  49.     long    m_lLength;
  50.     BYTE*    m_pbtCache;
  51.     long    m_lCacheLen;
  52.  
  53.     CGenFile* m_pcf;
  54. };
  55.  
  56. #endif //__CPreFILE_H__
  57.